package com.haven123.cloudapp.logstash;

import com.haven123.cloudapp.logstash.feign.HelloService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author haven
 */
@Slf4j
@Component
@EnableScheduling
public class Schedu {
    @Autowired private HelloService helloService;

    @Scheduled(fixedDelay = 1000)
    public void este(){
        log.info("定时任务请求");
        String hello = helloService.hello();
        log.info("定时任务请求结束");
    }
}
